body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f4f4f4;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #0056b3;
  margin-bottom: 30px;
}

.top-section-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.query-section {
  flex: 2;
  min-width: 450px;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.metrics-container {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
}

.metrics-container p {
  margin: 0 15px;
  font-size: 18px;
}

.query-controls {
  display: flex;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.query-buttons.right-align {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.query-section .input-group {
  margin-bottom: 0;
  flex: 1;
  min-width: 180px;
}

.query-section label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.query-section input[type="date"],
.query-section input[type="text"],
.query-section select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.query-buttons {
  display: flex;
  gap: 10px;
  margin-top: 0;
}

.query-section button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.query-section button:hover {
  background-color: #0056b3;
}

.secondary-btn {
  background-color: #6c757d;
  margin-left: 10px;
}

.secondary-btn:hover {
  background-color: #5a6268;
}

.danger-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.danger-btn:hover {
  background-color: #c82333;
}

.danger-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.table-controls {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.table-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
  margin: 0;
}

.table-controls input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.table-controls #selectedCount {
  margin-left: 15px;
  padding: 4px 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  font-size: 14px;
}

/* 自定义确认对话框样式 */
.custom-confirm-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.custom-confirm-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 0;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-confirm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 20px;
  border-bottom: none;
}

.custom-confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.custom-confirm-close {
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  background: none;
  border: none;
}

.custom-confirm-close:hover {
  color: #666;
}

.custom-confirm-body {
  padding: 20px;
  text-align: left;
}

.custom-confirm-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
}

.custom-confirm-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: #ffc107;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

.custom-confirm-text {
  flex: 1;
  margin: 0;
}

.custom-confirm-footer {
  padding: 0 20px 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.custom-confirm-btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  min-width: 80px;
}

.custom-confirm-btn.cancel {
  background-color: #fff;
  border-color: #ddd;
  color: #666;
}

.custom-confirm-btn.cancel:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.custom-confirm-btn.confirm {
  background-color: #007bff;
  color: #fff;
}

.custom-confirm-btn.confirm:hover {
  background-color: #0056b3;
}

.custom-confirm-btn.confirm:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.custom-confirm-btn.danger {
  background-color: #dc3545;
  color: #fff;
}

.custom-confirm-btn.danger:hover {
  background-color: #c82333;
}

.custom-confirm-btn.danger:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

.pagination-controls label,
.pagination-controls select,
.pagination-controls button {
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  cursor: pointer;
}

.pagination-controls select {
  background-color: #fff;
}

.pagination-controls button {
  background-color: #007bff;
  color: white;
  border: none;
  transition: background-color 0.3s ease;
}

.pagination-controls button:hover:not(:disabled) {
  background-color: #0056b3;
}

.pagination-controls button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.call-list-container {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.call-list-container h2 {
  margin-top: 0;
  color: #333;
}

.call-list-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.call-list-container th,
.call-list-container td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

/* 特定列的宽度控制 */
.call-list-container th:nth-child(1), /* 选择列 */
.call-list-container td:nth-child(1) {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}

.call-list-container th:nth-child(2), /* 序号列 */
.call-list-container td:nth-child(2) {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

.call-list-container th:nth-child(3), /* 条形码/原始编号列 */
.call-list-container td:nth-child(3) {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.call-list-container th:nth-child(4), /* 信访件编号列 */
.call-list-container td:nth-child(4) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.call-list-container th:nth-child(5), /* 开始时间列 */
.call-list-container td:nth-child(5) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.call-list-container th:nth-child(6), /* 状态列 */
.call-list-container td:nth-child(6) {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}

.call-list-container th:nth-child(7), /* 处理时间列 */
.call-list-container td:nth-child(7) {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.call-list-container th:nth-child(8), /* 操作列 */
.call-list-container td:nth-child(8) {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

/* 条形码和信访件编号列的悬停提示 */
.call-list-container td:nth-child(3):hover::after,
.call-list-container td:nth-child(4):hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: 100%;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: normal;
  max-width: 250px;
  word-break: break-all;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-out forwards;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 悬停提示动画 */
@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 确保悬停提示在表格容器内正确显示 */
.call-list-container {
  position: relative;
  overflow: visible;
}

.call-list-container table {
  position: relative;
}

/* 为条形码和信访件编号列添加悬停效果 */
.call-list-container td:nth-child(3):hover,
.call-list-container td:nth-child(4):hover {
  background-color: #f8f9fa;
  cursor: help;
}

/* 移除之前的换行样式，现在使用省略号加悬停提示 */

.call-list-container th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #333;
}

.call-list-container tr:nth-child(even) {
  background-color: #f9f9f9;
}

.call-list-container tr:hover {
  background-color: #f1f1f1;
}

.call-list-container .status-success {
  color: green;
  font-weight: bold;
  font-size: 16px;
}

.call-list-container .status-failed {
  color: red;
  font-weight: bold;
  font-size: 16px;
}

.call-list-container .action-btn {
  background-color: #28a745;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.call-list-container .action-btn:hover {
  background-color: #218838;
}

.call-list-container .delete-btn {
  background-color: #dc3545;
  margin-left: 10px;
}

.call-list-container .delete-btn:hover {
  background-color: #c82333;
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
  padding-top: 60px;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-content h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.modal-content p {
  margin-bottom: 10px;
  font-size: 16px;
  color: #555;
}

.modal-content strong {
  color: #333;
}

.modal-content .detail-section {
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 15px;
  margin-top: 15px;
}

.modal-content .detail-section h4 {
  margin-top: 0;
  color: #007bff;
  margin-bottom: 10px;
}

.modal-content pre {
  background-color: #e9e9e9;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: #333;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* New styles for charts section */
.charts-section {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chart-container {
  flex: 1;
  min-width: 300px;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 5px;
  background-color: #fafafa;
}

h2 {
  text-align: center;
  color: #007bff;
  margin-top: 0;
  margin-bottom: 20px;
}

/* 美化txm/ysbh输入框 */
#queryTxm,
#queryYsbh {
  border: 2px solid #007bff;
  background-color: #f8fbff;
  color: #0056b3;
  font-weight: bold;
}

/* 美化表格新列 */
/*
.call-list-container th:nth-child(3),
.call-list-container td:nth-child(3) {
  background-color: #eaf4ff;
  color: #007bff;
  font-weight: bold;
}
*/

/* 响应式设计 */
@media (max-width: 1200px) {
  .container {
    max-width: 95%;
    padding: 15px;
  }

  .call-list-container {
    padding: 15px;
    overflow-x: auto;
  }

  .call-list-container table {
    min-width: 800px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .top-section-container {
    flex-direction: column;
    gap: 15px;
  }

  .query-section {
    min-width: auto;
  }

  .query-controls {
    flex-direction: column;
    gap: 15px;
  }

  .call-list-container {
    padding: 10px;
  }
}

/* 美观的通知提示样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: notificationSlideIn 0.3s ease-out;
  max-width: 350px;
}

.notification.success {
  background: linear-gradient(135deg, #4caf50, #45a049);
  border-left: 4px solid #2e7d32;
}

.notification.error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  border-left: 4px solid #b71c1c;
}

.notification.info {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  border-left: 4px solid #0d47a1;
}

.notification-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification.success .notification-icon {
  background-color: rgba(255, 255, 255, 0.2);
}

.notification.error .notification-icon {
  background-color: rgba(255, 255, 255, 0.2);
}

.notification.info .notification-icon {
  background-color: rgba(255, 255, 255, 0.2);
}

.notification-text {
  flex: 1;
  margin: 0;
}

.notification-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 通知动画 */
@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notificationSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.notification.hiding {
  animation: notificationSlideOut 0.3s ease-in forwards;
}
